package com.jxc.wiki.controller;

import com.jxc.wiki.entity.Demo;
import com.jxc.wiki.service.DemoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class DemoController {

    @Resource
    private DemoService demoService;

    // 测试get请求
    @RequestMapping("/demo/list")
    @ResponseBody
    public List<Demo> list(){
        return demoService.list();
    }


}
